{{ define "main" }}
  <div class="container" role="main">
    <div class="row">
      <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
        <div class="header-internal">
            <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
        </div>
        <div class="page-content">
        {{ with .Content }}
            {{.}}
        {{ end }}
        <div class="posts-list">
          {{ range .Paginator.Pages }}
            <article class="post-preview">
              <a href="{{ .Permalink }}">
                <h2 class="post-title">{{ .Title }}</h2>

                {{ if .Params.subtitle }}
                  <h3 class="post-subtitle">
                    {{ .Params.subtitle }}
                  </h3>
                {{ end }}
              </a>

              <p class="post-meta">
                {{ partial "post_meta.html" . }}
              </p>
              <div class="post-entry">
                <p>
                {{ if .Truncated }}
                  {{ .Summary | plainify | htmlUnescape }}
                  <a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a>
                {{ else }}
                  {{ .Content }}
                {{ end }}
                </p>
              </div>
            </article>
          {{ end }}
        </div>
        {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
          <ul class="pager main-pager">
            {{ if .Paginator.HasPrev }}
              <li class="previous">
                <a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">&larr; {{ i18n "newerPosts" }}</a>
              </li>
            {{ end }}
            {{ if .Paginator.HasNext }}
              <li class="next">
                <a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">{{ i18n "olderPosts" }} &rarr;</a>
              </li>
            {{ end }}
          </ul>
        {{ end }}
      </div>
    </div>
    {{ partial "sidebar_blog.html" . }}  
  </div>
</div>
{{ end }}
